<template>
  <el-dialog title="项目标段详情" :visible.sync="show" width="1000px" @closed="closed">
    <el-descriptions size="small" border :label-style="{ whiteSpace: 'nowrap' }" :content-style="{ maxWidth: '250px' }">
      <el-descriptions-item label="成本分期项目">{{ info.curProjectName }}</el-descriptions-item>
      <el-descriptions-item label="标段类型">
        <dict-tag :options="dict.type.gcx_section_type" :value="info.sectionType" />
      </el-descriptions-item>
      <el-descriptions-item label="标段名称">{{ info.sectionName }}</el-descriptions-item>
      <el-descriptions-item label="标段别名">{{ info.sectionAlias }}</el-descriptions-item>
      <el-descriptions-item label="合同">{{ info.contractName }}</el-descriptions-item>
      <el-descriptions-item label="承建商单位">{{ info.constructionName }}</el-descriptions-item>
      <el-descriptions-item label="关联土建标段" v-if="info.relationSectionName">{{ info.relationSectionName }} {{ info.relationConstructionNameBySection || '' }}</el-descriptions-item>
      <el-descriptions-item label="创建人">{{ info.creatorName }}</el-descriptions-item>
      <el-descriptions-item label="创建时间">{{ info.createTime }}</el-descriptions-item>
      <el-descriptions-item label="修改人">{{ info.updatorName }}</el-descriptions-item>
      <el-descriptions-item label="修改时间">{{ info.updateTime }}</el-descriptions-item>
      <el-descriptions-item label="备注">{{ info.remark }}</el-descriptions-item>
    </el-descriptions>

    <el-table :data="info.sectionBuilds" size="small" style="margin-top: 20px">
      <el-table-column label="已选楼栋" prop="buildName" />
    </el-table>
  </el-dialog>
</template>
<script>
// 标段详情
export default {
  dicts: ['gcx_section_type'],
  data() {
    return { show: false, info: {} }
  },
  methods: {
    open(data) {
      this.show = true
      this.info = data
    },
    closed() {
      this.info = {}
    }
  }
}
</script>
